{% extends "base.html" %}

{% block content %}
	<div class="left">
		<div class="inventory">
			<div class="room_inventory">
			{% if room.inventory %}
			<p>Available Items (click to pick up):</p>
			<form action="{{this_page}}" method="post">
			{% for item in room.inventory.values %}
			<div class="item"><span title="{{item.get_description}}">
				<input type="image" src="{{item.get_image}}" width="48" height="48" name="room_inventory" value="{{item.get_id}}"/></span></div>
			{% endfor %}
			
			</form>
			{% else %}
			<p>No Available Items.</p>
			{% endif %}
			</div>
		
			<div class="player_inventory">
			<p>Your inventory (click to drop):</p>
			{% if player.inventory %}
			<form action="{{this_page}}" method="post">
			{% for item in player.inventory.values %}
			<div class="item"><span title="{{item.get_description}}">
				<input type="image" src="{{item.get_image}}" width="48" height="48" name="player_inventory" value="{{item.get_id}}"/></span></div>
			{% endfor %}
			
			</form>
			{% else %}
			<p>You are not carrying anything.</p>
			{% endif %}
			</div>
			<div style="clear:both;"></div> 
		</div>
	</div>
	
	<div class="middle">
		<div class="room_image">
		{% if room.get_image %}
		<img src="images/{{room.get_image}}"/>
		{% endif %}
		</div>
		
		{% if cutscene %}
		<div class="cutscene">
		<p>{{cutscene}}</p>
		</div>
		{% endif %}
		
		<div class="room_description">
		<p>{{room.get_description}}</p>
		<p class="alert">{{player.get_alert}}</p>
		</div>
	</div>


		
	<div class="right">
		<div class="actions">
		<p>Things to do:</p>
		{% for action in menu.actions.values %}
			{% if not action.is_nav_action %}
				<div>
					<form action="{{this_page}}" method="{{action.get_method}}">
			      		<input type="hidden" name="action_name" value="{{action.get_id}}" />
			      		<input class="myButton" type="submit" name="action" value="{{action.get_description}}"/>
					</form>
				</div>
			{% endif %}
		{% endfor %}
		</div>
		
		<div class="actions">
		<p>Places to go:</p>
		{% for action in menu.actions.values %}
			{% if action.is_nav_action %}
				<div>
					<form action="{{this_page}}" method="{{action.get_method}}">
			      		<input type="hidden" name="action_name" value="{{action.get_id}}" />
			      		<input class="myButton" type="submit" name="action" value="{{action.get_description}}"/>
					</form>
				</div>
			{% endif %}
		{% endfor %}
		</div>
		
	</div>
{% endblock content %}
